package com.vichat.business.entity;


import javax.persistence.*;
import java.util.Date;
import java.util.List;

/***************
 *author: autogen
 *version: 2019-02-18 13:43:33.21
 */
@Entity
@Table(name = "common_alarm",catalog = "businessdb")
public class CommonAlarm implements java.io.Serializable{

	private static final long serialVersionUID = 1L;
	


    public static final String TABLE = "common_alarm";

    /** */
	public static final String ALIAS_ALARM_ID = "alarm_id";
    /**用户ID */
	public static final String ALIAS_UID = "uid";
    /** */
	public static final String ALIAS_PARTY_ID = "party_id";
    /** */
	public static final String ALIAS_ORG_ID = "org_id";
    /** */
	public static final String ALIAS_ORG_CODE = "org_code";
    /**经度 */
	public static final String ALIAS_LONGITUDE = "longitude";
    /**纬度 */
	public static final String ALIAS_LATITUDE = "latitude";
    /**详细地址 */
	public static final String ALIAS_ADDRESS = "address";
    /**精度 */
	public static final String ALIAS_PRE_CISION = "pre_cision";
    /**定位类型 */
	public static final String ALIAS_LOC_TYPE = "loc_type";
    /**上传时间 */
	public static final String ALIAS_LOC_TIME = "loc_time";
    /**告警时间 */
	public static final String ALIAS_ALARM_TIME = "alarm_time";
    /**告警类型: 1 围栏（进） 2 围栏（出） */
	public static final String ALIAS_ALARM_TYPE = "alarm_type";
    /**告警状态: 1 告警中 2 处理完毕 3 取消 4 开始处理 */
	public static final String ALIAS_ALARM_STATE = "alarm_state";
    /**处理人ID */
	public static final String ALIAS_DEAL_UID = "deal_uid";
    /**处理时间 */
	public static final String ALIAS_DEAL_TIME = "deal_time";
    /**处理内容 */
	public static final String ALIAS_DEAL_RESULT = "deal_result";
    /**数据 0 无效 1 有效 */
	public static final String ALIAS_STATE = "state";
    /**创建时间 */
	public static final String ALIAS_CREATE_TIME = "create_time";
    /**修改时间 */
	public static final String ALIAS_UPDATE_TIME = "update_time";
    /**告警对象类型 */
	public static final String ALIAS_OBJ_TYPE = "obj_type";
    /**告警对象编号 */
	public static final String ALIAS_OBJ_ID = "obj_id";
    /**告警等级 1 普通告警  2 紧急告警 */
	public static final String ALIAS_ALARM_LEVEL = "alarm_level";
	
	

 	@Id
@   GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "alarm_id", unique = true, nullable = false)
    public java.lang.Long alarmId;
  
 	@Column(name = "uid")
    public java.lang.Long uid;
  
 	@Column(name = "party_id")
    public java.lang.Long partyId;
  
 	@Column(name = "org_id")
    public java.lang.Long orgId;
  
 	@Column(name = "org_code")
    public java.lang.String orgCode;
  
 	@Column(name = "longitude")
    public java.lang.String longitude;
  
 	@Column(name = "latitude")
    public java.lang.String latitude;
  
 	@Column(name = "address")
    public java.lang.String address = "";
  
 	@Column(name = "pre_cision")
    public java.lang.String preCision = "0.00";
  
 	@Column(name = "loc_type")
    public java.lang.Integer locType = 0;
  
 	@Column(name = "loc_time")
    public java.lang.Long locTime = 0l;
  
 	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "alarm_time")
    public java.util.Date alarmTime;
  
 	@Column(name = "alarm_type")
    public java.lang.Long alarmType;
  
 	@Column(name = "alarm_state")
    public java.lang.Long alarmState;
  
 	@Column(name = "deal_uid")
    public java.lang.Long dealUid;
  
 	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "deal_time")
    public java.util.Date dealTime;
  
 	@Column(name = "deal_result")
    public java.lang.String dealResult;
  
 	@Column(name = "state")
    public java.lang.Long state = 1l;
  
 	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_time")
    public java.util.Date createTime;
  
 	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "update_time")
    public java.util.Date updateTime;
  
 	@Column(name = "obj_type")
    public java.lang.Long objType;
  
 	@Column(name = "obj_id")
    public java.lang.Long objId;
  
 	@Column(name = "alarm_level")
    public java.lang.Long alarmLevel;
  





	public java.lang.Long getAlarmId() {
		return this.alarmId;
	}
	
	public void setAlarmId(java.lang.Long value) {
		this.alarmId = value;
	}

	public java.lang.Long getUid() {
		return this.uid;
	}
	
	public void setUid(java.lang.Long value) {
		this.uid = value;
	}

	public java.lang.Long getPartyId() {
		return this.partyId;
	}
	
	public void setPartyId(java.lang.Long value) {
		this.partyId = value;
	}

	public java.lang.Long getOrgId() {
		return this.orgId;
	}
	
	public void setOrgId(java.lang.Long value) {
		this.orgId = value;
	}

	public java.lang.String getOrgCode() {
		return this.orgCode;
	}
	
	public void setOrgCode(java.lang.String value) {
		this.orgCode = value;
	}

	public java.lang.String getLongitude() {
		return this.longitude;
	}
	
	public void setLongitude(java.lang.String value) {
		this.longitude = value;
	}

	public java.lang.String getLatitude() {
		return this.latitude;
	}
	
	public void setLatitude(java.lang.String value) {
		this.latitude = value;
	}

	public java.lang.String getAddress() {
		return this.address;
	}
	
	public void setAddress(java.lang.String value) {
		this.address = value;
	}

	public java.lang.String getPreCision() {
		return this.preCision;
	}
	
	public void setPreCision(java.lang.String value) {
		this.preCision = value;
	}

	public java.lang.Integer getLocType() {
		return this.locType;
	}
	
	public void setLocType(java.lang.Integer value) {
		this.locType = value;
	}

	public java.lang.Long getLocTime() {
		return this.locTime;
	}
	
	public void setLocTime(java.lang.Long value) {
		this.locTime = value;
	}

	public java.util.Date getAlarmTime() {
		return this.alarmTime;
	}
	
	public void setAlarmTime(java.util.Date value) {
		this.alarmTime = value;
	}

	public java.lang.Long getAlarmType() {
		return this.alarmType;
	}
	
	public void setAlarmType(java.lang.Long value) {
		this.alarmType = value;
	}

	public java.lang.Long getAlarmState() {
		return this.alarmState;
	}
	
	public void setAlarmState(java.lang.Long value) {
		this.alarmState = value;
	}

	public java.lang.Long getDealUid() {
		return this.dealUid;
	}
	
	public void setDealUid(java.lang.Long value) {
		this.dealUid = value;
	}

	public java.util.Date getDealTime() {
		return this.dealTime;
	}
	
	public void setDealTime(java.util.Date value) {
		this.dealTime = value;
	}

	public java.lang.String getDealResult() {
		return this.dealResult;
	}
	
	public void setDealResult(java.lang.String value) {
		this.dealResult = value;
	}

	public java.lang.Long getState() {
		return this.state;
	}
	
	public void setState(java.lang.Long value) {
		this.state = value;
	}

	public java.util.Date getCreateTime() {
		return this.createTime;
	}
	
	public void setCreateTime(java.util.Date value) {
		this.createTime = value;
	}

	public java.util.Date getUpdateTime() {
		return this.updateTime;
	}
	
	public void setUpdateTime(java.util.Date value) {
		this.updateTime = value;
	}

	public java.lang.Long getObjType() {
		return this.objType;
	}
	
	public void setObjType(java.lang.Long value) {
		this.objType = value;
	}

	public java.lang.Long getObjId() {
		return this.objId;
	}
	
	public void setObjId(java.lang.Long value) {
		this.objId = value;
	}

	public java.lang.Long getAlarmLevel() {
		return this.alarmLevel;
	}
	
	public void setAlarmLevel(java.lang.Long value) {
		this.alarmLevel = value;
	}


	
	public CommonAlarm() {
	}
	
	public CommonAlarm(boolean qryflag) {
	    if(qryflag){
	    		this.alarmId = null;
				this.uid = null;
				this.partyId = null;
				this.orgId = null;
				this.orgCode = null;
				this.longitude = null;
				this.latitude = null;
				this.address = null;
				this.preCision = null;
				this.locType = null;
				this.locTime = null;
				this.alarmTime = null;
				this.alarmType = null;
				this.alarmState = null;
				this.dealUid = null;
				this.dealTime = null;
				this.dealResult = null;
				this.state = null;
				this.createTime = null;
				this.updateTime = null;
				this.objType = null;
				this.objId = null;
				this.alarmLevel = null;
			    }
	}


	public CommonAlarm(
	    java.lang.Long inAlarmId,
	    java.lang.Long inUid,
	    java.lang.Long inPartyId,
	    java.lang.Long inOrgId,
	    java.lang.String inOrgCode,
	    java.lang.String inLongitude,
	    java.lang.String inLatitude,
	    java.lang.String inAddress,
	    java.lang.String inPreCision,
	    java.lang.Integer inLocType,
	    java.lang.Long inLocTime,
	    java.util.Date inAlarmTime,
	    java.lang.Long inAlarmType,
	    java.lang.Long inAlarmState,
	    java.lang.Long inDealUid,
	    java.util.Date inDealTime,
	    java.lang.String inDealResult,
	    java.lang.Long inState,
	    java.util.Date inCreateTime,
	    java.util.Date inUpdateTime,
	    java.lang.Long inObjType,
	    java.lang.Long inObjId,
		java.lang.Long inAlarmLevel
	 ) {
		super();
				this.alarmId = inAlarmId;
				this.uid = inUid;
				this.partyId = inPartyId;
				this.orgId = inOrgId;
				this.orgCode = inOrgCode;
				this.longitude = inLongitude;
				this.latitude = inLatitude;
				this.address = inAddress;
				this.preCision = inPreCision;
				this.locType = inLocType;
				this.locTime = inLocTime;
				this.alarmTime = inAlarmTime;
				this.alarmType = inAlarmType;
				this.alarmState = inAlarmState;
				this.dealUid = inDealUid;
				this.dealTime = inDealTime;
				this.dealResult = inDealResult;
				this.state = inState;
				this.createTime = inCreateTime;
				this.updateTime = inUpdateTime;
				this.objType = inObjType;
				this.objId = inObjId;
				this.alarmLevel = inAlarmLevel;
			}



	@Transient
	private String uName = "";

	public String getuName() {
		return uName;
	}

	public void setuName(String uName) {
		this.uName = uName;
	}

	@Transient
	private String dealUName = "";

	public String getDealUName() {
		return dealUName;
	}

	public void setDealUName(String dealUName) {
		this.dealUName = dealUName;
	}

	@Transient
	private Date startDate;
	@Transient
	private Date endDate;

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	@Transient
	private List<Long> alarmIds;

	public List<Long> getAlarmIds() {
		return alarmIds;
	}

	public void setAlarmIds(List<Long> alarmIds) {
		this.alarmIds = alarmIds;
	}

	@Transient
	private String objName;

	public String getObjName() {
		return objName;
	}

	public void setObjName(String objName) {
		this.objName = objName;
	}
}

